package com.zy.cat.entity.ztk;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.ZTKGoodsCountPrimary;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "zy_cat_ztk_goods_count_data", indexes = {
		@Index(name = "cid", columnList = "cid"),
		@Index(name = "q", columnList = "q"),
		@Index(name = "ltime", columnList = "ltime"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@NoArgsConstructor
@AllArgsConstructor
@IdClass(ZTKGoodsCountPrimary.class)
public class ZTKGoodsCount {

	@Id
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '一级类目ID'")
	@ApiModelProperty(value = "一级类目ID", example = "")
	private String cid;
	
	@Column(columnDefinition = "VARCHAR(32) NOT NULL COMMENT '一级类目名称'")
	@ApiModelProperty(value = "一级类目名称", example = "")
	private String cname;
	
	@Id
	@Column(columnDefinition = "VARCHAR(32) NOT NULL COMMENT '二级类目名称'")
	@ApiModelProperty(value = "二级类目名称", example = "")
	private String q;
 
	@Column(columnDefinition = "VARCHAR(300) NOT NULL COMMENT '二级类目图片'")
	@ApiModelProperty(value = "二级类目图片", example = "")
	private String pic;
	
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0'  COMMENT '一级类目商品数量'")
	@ApiModelProperty(value = "一级类目商品数量", example = "0")
	private long ccount;
	
	@Column(columnDefinition = "BIGINT(10) DEFAULT '0'  COMMENT '二级类目商品数量'")
	@ApiModelProperty(value = "二级类目商品数量", example = "0")
	private long qcount;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-' COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "")
	private String ctime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-' COMMENT '更新时间'")
	@ApiModelProperty(value = "更新时间", example = "")
	private String ltime;
}
